home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / sound / mtlabsnd.zip / HANDLERS.C < prev    next >
C/C++ Source or Header  |  1993-04-26  |  2KB  |  84 lines

  1. /*
  2.  * July 5, 1991
  3.  * Copyright 1991 Lance Norskog And Sundry Contributors
  4.  * This source code is freely redistributable and may be used for
  5.  * any purpose.  This copyright notice must be maintained. 
  6.  * Lance Norskog And Sundry Contributors are not responsible for 
  7.  * the consequences of using this software.
  8.  */
  9.  
  10. #include "st.h"
  11.  
  12. /*
  13.  * Sound Tools file format and effect tables.
  14.  */
  15.  
  16. /* File format handlers. */
  17.  
  18. char *rawnames[] = {
  19.     "raw",
  20.     (char *) 0
  21. };
  22. extern rawstartread(), rawread();
  23. extern rawstartwrite(), rawwrite(), rawstopwrite();
  24.  
  25. char *vocnames[] = {
  26.     "voc",
  27.     (char *) 0
  28. };
  29. extern vocstartread(), vocread(), vocstopread();
  30. extern vocstartwrite(), vocwrite(), vocstopwrite();
  31.  
  32.  
  33. char *wavnames[] = {
  34.     "wav",
  35.     (char *) 0
  36. };
  37.  
  38. extern wavstartread(),wavread();
  39. extern wavstartwrite(),wavwrite(),wavstopwrite();
  40.  
  41. char *matnames[] = {
  42.     "mat",
  43.     (char *) 0
  44. };
  45.  
  46. extern matstartread(),matread();
  47. extern matstartwrite(),matwrite(),matstopwrite();
  48.  
  49. extern nothing();
  50.  
  51. format_t formats[] = {
  52.     {matnames,matstartread,matread,nothing,
  53.         matstartwrite,matwrite,matstopwrite},   /* Matlab .mat files */
  54.     {rawnames, rawstartread, rawread, nothing,     /* Raw format */
  55.         rawstartwrite, rawwrite, nothing},
  56.     {vocnames, vocstartread, vocread, vocstopread,  /* Sound Blaster .VOC */
  57.         vocstartwrite, vocwrite, vocstopwrite},
  58.     {wavnames,wavstartread,wavread,nothing,
  59.         wavstartwrite,wavwrite,wavstopwrite},   /* Windows 3.0 .wav */
  60.     0
  61. };
  62.  
  63. /* Effects handlers. */
  64.  
  65. extern null_drain();        /* dummy drain routine */
  66.  
  67. extern copy_getopts(), copy_start(), copy_flow(), copy_stop();
  68.  
  69. /*
  70.  * EFF_CHAN means that the number of channels can change.
  71.  * EFF_RATE means that the sample rate can change.
  72.  * The first effect which can handle a data rate change, stereo->mono, etc.
  73.  * is the default handler for that problem.
  74.  * 
  75.  * EFF_MCHAN just means that the effect is coded for multiple channels.
  76.  */
  77.  
  78. effect_t effects[] = {
  79.     {"copy", EFF_MCHAN,
  80.             copy_getopts, copy_start, copy_flow, null_drain, nothing},
  81.     0
  82. };
  83.  
  84.